<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>管理中心</a></li>
			<li class="active"><strong>日历</strong></li>
		</ol>
	</div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	ng-controller="calendarCtrl">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<h5>日历条件查询</h5>
						<div ibox-tools></div>
					</div>
					<div class="ibox-content">
						<div class="form-group">
							<label class="col-sm-2 control-label">事件名称：</label>
							<div class="col-sm-2">
								<input type="text" class="form-control"
									ng-model='baseInfo.eventName'>
							</div>
							<label class="col-sm-2 control-label">类型：</label>
							<div class="col-sm-2">
								<select class="form-control" ng-model='baseInfo.type'
										ng-options="x.value as x.text for x in allType">
								</select>
							</div>
						</div>
						<div class="form-group">
								<label class="col-sm-2 control-label">日期：</label>
								<div class="col-sm-6">
									<input type="datetime" class="form-control" style="width:auto;display:inline-block;" date-time ng-model="baseInfo.startDate" view="date"  min-view="date" format="YYYY-MM-DD"> ~
									<div style="position: relative; display: inline-block">
										<input type="datetime" class="form-control" style="width:auto;display:inline-block;" date-time ng-model="baseInfo.endDate" view="date"  min-view="date" format="YYYY-MM-DD">
									</div>
								</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2"></label>
							<div class="col-sm-6">
								<button class="btn btn-primary6 btn-mr20" type="button" ng-click='query()'>查询</button>
								<button class="btn btn-primary3 btn-mr20" type="button" ng-click="resetForm()">清空</button>
								<button class="btn btn-primary5" ng-show="hasPermit('calendar.insert')" type="button" ng-click="calendarModal()">新增</button>
							</div>
						</div>
					</div>
				</div>

				<div class="panel-body ibox float-e-margins">
					<div class="ibox-title">
						<h5>日历信息列表</h5>
						<div ibox-tools="" class="ng-scope"></div>
					</div>
					<div class="ibox-content">
						<div class="gridStyle" ui-grid="calendar" ui-grid-pagination ui-grid-pinning ui-grid-resize-columns></div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<form class="form-horizontal" id="form2" name="horizontalAdd" novalidate>
		<div id="calendarModal" class="modal fade" tabindex="-1" role="dialog">
			<div class="modal-dialog" style="width: 900px">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							&times;</button>
						<h3 class="modal-title">{{type==1?'新增':'修改'}}日历</h3>
					</div>
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-2 control-label"><i class="red_req">*</i>事件名称：</label>
							<div class="col-sm-3">
								<input type="text" class="form-control"
									ng-model='newInfo.eventName' name="eventName" required/>
								<div class="req_mesg" ng-show="horizontalAdd.eventName.$dirty && hohorizontalAddAddserName.$invalid">
									<span ng-show="horizontalAdd.eventName.$error.required">事件名称不能为空</span>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><i class="red_req">*</i>系统时间：</label>
							<div class="col-sm-3">
									<input type="datetime" class="form-control" style="width:auto;display:inline-block;" date-time view="date" name="sysDate" min-view="date" format="YYYY-MM-DD" ng-model="newInfo.sysDate"
									required />
								<div class="req_mesg" ng-show="horizontalAdd.sysDate.$dirty && horizontalAdd.sysDate.$invalid">
									<span ng-show="horizontalAdd.sysDate.$error.required">系统时间不能为空</span>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">类型：</label>
							<div class="col-sm-3">
								<select class="form-control" ng-model='newInfo.type'
									ng-options="x.value as x.text for x in types">
								</select>
							</div>
							<label class="col-sm-2 control-label">状态：</label>
							<div class="col-sm-3">
								<select class="form-control" ng-model='newInfo.status'
									ng-options="x.value as x.text for x in statusType">
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-6">
								<button class="btn btn-primary" type="button" ng-click='submitNewInfo()'
									id="btnSubmit" ng-disabled="horizontalAdd.$invalid || submitting">提交</button>
									<button class="btn btn-primary8" type="button" ng-click='cancel()'
									>取消</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>